home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/perl
-
- $timeoffset = 0; # Time offset - change it's value if your server time
- # conflicts with your local time.
-
- # You wil get "possible typo" warning if you won't use all the variables.
- # Please insert "undef" instead of unused variables when you upload the
- # script to web server.
- ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time + (3600*$timeoffset));
-
- # Hours, minutes, seconds, day and month should be in two-digit format.
- $hour = "0$hour" if ($hour < 10);
- $min = "0$min" if ($min < 10);
- $sec = "0$sec" if ($sec < 10);
- $mday = "0$mday" if ($mday < 10);
- $mon = "0$mon" if ($mon < 10);
-
- # Y2K!
- $year = 2000 + ($year - 100);
-
- # Send the MIME HTTP header
- print "Content-type: text/html\n\n";
-
- # Compose the output from the variables defined in the line 9. Feel free to
- # change it. [DD.MM.YYYY]
- print "<h1>$mday.$mon.$year $hour:$min:$sec</h1>\n";
-
- # Hint: you may call this script by SSI using this tag:
- # <!--#exec cgi="/cgi-bin/time.pl"-->
-